using Unity.Mathematics;
using UnityEngine;

[CreateAssetMenu(fileName = "StrengthEffect", menuName = "Card Effect/StrengthEffect")]
public class StrengthEffect : Effect
{
    public override void Excute(CharacterBase from, CharacterBase target)
    {
        switch (targetType)
        {
            case EffectTargetType.self:
                from.SetUpStrength(value,buffPercent,true);
                break;
            case EffectTargetType.Target:
                target.SetUpStrength(value,buffPercent,false);
                break;
            case EffectTargetType.All:
                foreach (var enemy in GameObject.FindGameObjectsWithTag("Enemy"))
                {
                    enemy.GetComponent<CharacterBase>().SetUpStrength(value,buffPercent,false);
                }
                break;
        }
    }
}
